<?php

/**
 * InputFortnightAgromet form base class.
 *
 * @method InputFortnightAgromet getObject() Returns the current form's model object
 *
 * @package    TMD
 * @subpackage form
 * @author     Thaihosting
 */
abstract class BaseInputFortnightAgrometForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'DTTIME_FORECAST'      => new sfWidgetFormInputHidden(),
      'DTSAVE_TIME'          => new sfWidgetFormDateTime(),
      'IUSER_ID'             => new sfWidgetFormInputText(),
      'SWEATHER_TH'          => new sfWidgetFormTextarea(),
      'SWEATHER_ENG'         => new sfWidgetFormTextarea(),
      'SWARNING_TH'          => new sfWidgetFormTextarea(),
      'SWARNING_ENG'         => new sfWidgetFormTextarea(),
      'SWEATHER_AGROMET_TH'  => new sfWidgetFormTextarea(),
      'SWEATHER_AGROMET_ENG' => new sfWidgetFormTextarea(),
      'SREMIND_TH'           => new sfWidgetFormTextarea(),
      'SREMIND_ENG'          => new sfWidgetFormTextarea(),
      'SDOC_LINK'            => new sfWidgetFormInputText(),
    ));

    $this->setValidators(array(
      'DTTIME_FORECAST'      => new sfValidatorChoice(array('choices' => array($this->getObject()->getDttimeForecast()), 'empty_value' => $this->getObject()->getDttimeForecast(), 'required' => false)),
      'DTSAVE_TIME'          => new sfValidatorDateTime(),
      'IUSER_ID'             => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647, 'required' => false)),
      'SWEATHER_TH'          => new sfValidatorString(array('max_length' => 2147483646, 'required' => false)),
      'SWEATHER_ENG'         => new sfValidatorString(array('max_length' => 2147483646, 'required' => false)),
      'SWARNING_TH'          => new sfValidatorString(array('max_length' => 2147483646, 'required' => false)),
      'SWARNING_ENG'         => new sfValidatorString(array('max_length' => 2147483646, 'required' => false)),
      'SWEATHER_AGROMET_TH'  => new sfValidatorString(array('max_length' => 2147483646, 'required' => false)),
      'SWEATHER_AGROMET_ENG' => new sfValidatorString(array('max_length' => 2147483646, 'required' => false)),
      'SREMIND_TH'           => new sfValidatorString(array('max_length' => 2147483646, 'required' => false)),
      'SREMIND_ENG'          => new sfValidatorString(array('max_length' => 2147483646, 'required' => false)),
      'SDOC_LINK'            => new sfValidatorString(array('max_length' => 200, 'required' => false)),
    ));

    $this->widgetSchema->setNameFormat('input_fortnight_agromet[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'InputFortnightAgromet';
  }


}
